package com.starlink.model.util;

import com.starlink.model.dtomapper.UserVipPaymentDtoMapper;
import com.starlink.model.domain.UserVipPaymentDO;
import com.starlink.model.vo.UserVipPaymentVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class UserVipPaymentConvert {

    public static List<UserVipPaymentVO> buildUserVipPaymentVoList(List<UserVipPaymentDO> userVipPaymentDOList) {
        if (CollectionUtils.isEmpty(userVipPaymentDOList)) {
            return Lists.newArrayList();
        }
        List<UserVipPaymentVO> userVipPaymentVOList = new ArrayList<>();
        for (UserVipPaymentDO userVipPaymentDO : userVipPaymentDOList) {
            userVipPaymentVOList.add(UserVipPaymentDtoMapper.INSTANCE.do2VO(userVipPaymentDO));
        }

        return userVipPaymentVOList;
    }
}
